import React from 'react'
import styled from 'styled-components'

export default function App() {
    const Stylediv = styled.div`
        background-color:${props=>props.bg||'yellow'};  //自定义属性， 格式： (美元符号){props=>props.自定义属性名}
        width:100px;
        height:100px;
    `
  return (
    <div>
        <Stylediv bg='red'> 123</Stylediv>
    </div>
  )
}
